import java.io.IOException;
import java.rmi.NotBoundException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

/**
 * Test client for registering nodes to system.
 * @author the_james_marq
 *
 */
public class TestClient {

	/**
	 * Test client creates ten nodes.
	 * 
	 * @param args Command line arguments (hostname, port, registry name)
	 * @throws NotBoundException 
	 */
	public static void main(String[] args) throws IOException, NotBoundException {
        Registry registry = LocateRegistry.getRegistry(args[0], Integer.parseInt(args[1]));
        RemoteNodeRegistry stub = (RemoteNodeRegistry) registry.lookup(args[2]);
        
		for(int i=0; i<16; i++) {
			new NodeActual(stub, new HostPort("localhost", 8000+i));
			
		}
		System.out.println("test client finished.");
	}

}
